package com.gk.study.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("b_order")
public class Order implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    public Long id;
    @TableField
    public String status;
    @TableField
    public String orderTime;
    @TableField
    public String payTime;
    @TableField
    public Long thingId;
    @TableField
    public Long userId;
    @TableField
    public String count;
    @TableField
    public String orderNumber; // 订单编号
    @TableField
    public String receiverAddress;
    @TableField
    public String receiverName;
    @TableField
    public String receiverPhone;
    @TableField
    public String remark;

    @TableField(exist = false)
    public String username; // 用户名
    @TableField(exist = false)
    public String title; // 商品名称
    @TableField("cover")
    public String cover; // 商品封面
    @TableField(exist = false)
    public String price; // 商品价格

    @TableField
    public Integer hoursPerDay; // 每日课时
    @TableField
    public Integer days;       // 总天数
    @TableField
    public BigDecimal totalAmount; // 总金额

    @TableField("course_start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") // 格式注解
    private LocalDateTime courseStartTime;

    @TableField("teacher_name")
    private String teacherName;

    @TableField("subject")
    private String subject;


}
